package com.base.essearch;

import com.base.essearch.common.FileUploadConfig;
import com.base.essearch.common.util.IdWorker;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableScheduling;

/**
 * @author lr
 */
@SpringBootApplication
@EnableScheduling
@MapperScan("com.base.essearch.webupload.dao")
@MapperScan("com.base.essearch.video.mapper")
public class ElasticsearchApplication {

    public static void main(String[] args) {
        SpringApplication.run(ElasticsearchApplication.class, args);
        System.out.println("************ es启动成功 ************");
    }

    @Bean
    public IdWorker idWorker() {
        return new IdWorker(1, 1);
    }


    @Bean
    public FileUploadConfig fileUploadConfig() {
        return new FileUploadConfig();
    }
}
